<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>netaddr.strategy</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="netaddr-module.html">Package&nbsp;netaddr</a> ::
        Module&nbsp;strategy
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="netaddr.strategy-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module strategy</h1><p class="nomargin-top"><span class="codelink"><a href="netaddr.strategy-pysrc.html">source&nbsp;code</a></span></p>
<p>Contains various strategy classes that implement the behaviours of 
  each network address type.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy.AddrStrategy-class.html" class="summary-name">AddrStrategy</a><br />
      Very basic support for all common operations performed on each 
        network type.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy.IPv4Strategy-class.html" class="summary-name">IPv4Strategy</a><br />
      An optimised AddrStrategy for IP version 4 address processing.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy.IPv6Strategy-class.html" class="summary-name">IPv6Strategy</a><br />
      Implements the operations that can be performed on an Internet 
        Protocol version 6 network address.
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy.EUI48Strategy-class.html" class="summary-name">EUI48Strategy</a><br />
      Implements the operations that can be performed on an IEEE 48-bit 
        EUI (Extended Unique Identifer).
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="BIG_ENDIAN_PLATFORM"></a><span class="summary-name">BIG_ENDIAN_PLATFORM</span> = <code title="False">False</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AT_UNSPEC"></a><span class="summary-name">AT_UNSPEC</span> = <code title="0">0</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AT_INET"></a><span class="summary-name">AT_INET</span> = <code title="4">4</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AT_INET6"></a><span class="summary-name">AT_INET6</span> = <code title="6">6</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AT_LINK"></a><span class="summary-name">AT_LINK</span> = <code title="48">48</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="AT_EUI64"></a><span class="summary-name">AT_EUI64</span> = <code title="64">64</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#AT_DESCR" class="summary-name">AT_DESCR</a> = <code title="{0: 'Unspecified',
 4: 'Internet Protocol (version 4)',
 6: 'Internet Protocol (version 6)',
 48: 'MAC (Media Access Control)',
 64: '64-bit IEEE Extended Unique Identifier'}"><code class="variable-group">{</code>0<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Unspecified</code><code class="variable-quote">'</code><code class="variable-op">, </code>4<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Internet Protocol (version 4</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_BYTES_TO_BITS" class="summary-name" onclick="show_private();">_BYTES_TO_BITS</a> = <code title="['00000000',
 '00000001',
 '00000010',
 '00000011',
 '00000100',
 '00000101',
 '00000110',
 '00000111',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">00000000</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">00000001</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">00000010</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">0000001</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_MAC_std" class="summary-name" onclick="show_private();">_MAC_std</a> = <code title="AddrStrategy(addr_type= AT_LINK, width= 48, word_size= 8, word_fmt= '%\
02x', delimiter= ':')">AddrStrategy(addr_type= AT_LINK, width= 48, word_si<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_MAC_cisco_std" class="summary-name" onclick="show_private();">_MAC_cisco_std</a> = <code title="AddrStrategy(addr_type= AT_LINK, width= 48, word_size= 16, word_fmt= '\
%04x', delimiter= '.')">AddrStrategy(addr_type= AT_LINK, width= 48, w<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_EUI64_std" class="summary-name" onclick="show_private();">_EUI64_std</a> = <code title="AddrStrategy(addr_type= AT_EUI64, width= 64, word_size= 8, word_fmt= '\
%02x', delimiter= '-', to_upper= True)">AddrStrategy(addr_type= AT_EUI64, width= 64, word<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_IPv4_std" class="summary-name" onclick="show_private();">_IPv4_std</a> = <code title="AddrStrategy(addr_type= AT_INET, width= 32, word_size= 8, word_fmt= '%\
d', delimiter= '.', hex_words= False)">AddrStrategy(addr_type= AT_INET, width= 32, word_s<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#_IPv6_std" class="summary-name" onclick="show_private();">_IPv6_std</a> = <code title="AddrStrategy(addr_type= AT_INET6, width= 128, word_size= 16, word_fmt=\
 '%x', delimiter= ':')">AddrStrategy(addr_type= AT_INET6, width= 128, word<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_EUI48_opt"></a><span class="summary-name">_EUI48_opt</span> = <code title="EUI48Strategy()">EUI48Strategy()</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_IPv4_opt"></a><span class="summary-name">_IPv4_opt</span> = <code title="IPv4Strategy()">IPv4Strategy()</code>
    </td>
  </tr>
<tr class="private">
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="_IPv6_opt"></a><span class="summary-name">_IPv6_opt</span> = <code title="IPv6Strategy()">IPv6Strategy()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ST_EUI48"></a><span class="summary-name">ST_EUI48</span> = <code title="EUI48Strategy()">EUI48Strategy()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="netaddr.strategy-module.html#ST_EUI64" class="summary-name">ST_EUI64</a> = <code title="AddrStrategy(addr_type= AT_EUI64, width= 64, word_size= 8, word_fmt= '\
%02x', delimiter= '-', to_upper= True)">AddrStrategy(addr_type= AT_EUI64, width= 64, word_s<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ST_IPV4"></a><span class="summary-name">ST_IPV4</span> = <code title="IPv4Strategy()">IPv4Strategy()</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="ST_IPV6"></a><span class="summary-name">ST_IPV6</span> = <code title="IPv6Strategy()">IPv6Strategy()</code>
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="AT_DESCR"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">AT_DESCR</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">{</code>0<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Unspecified</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 4<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Internet Protocol (version 4)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 6<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">Internet Protocol (version 6)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 48<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">MAC (Media Access Control)</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 64<code class="variable-op">: </code><code class="variable-quote">'</code><code class="variable-string">64-bit IEEE Extended Unique Identifier</code><code class="variable-quote">'</code><code class="variable-group">}</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_BYTES_TO_BITS"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_BYTES_TO_BITS</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">00000000</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000001</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000010</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000011</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000100</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000101</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000110</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">00000111</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_MAC_std"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_MAC_std</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_LINK, width= 48, word_size= 8, word_fmt= '%<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
02x', delimiter= ':')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_MAC_cisco_std"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_MAC_cisco_std</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_LINK, width= 48, word_size= 16, word_fmt= '<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
%04x', delimiter= '.')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_EUI64_std"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_EUI64_std</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_EUI64, width= 64, word_size= 8, word_fmt= '<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
%02x', delimiter= '-', to_upper= True)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_IPv4_std"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_IPv4_std</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_INET, width= 32, word_size= 8, word_fmt= '%<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
d', delimiter= '.', hex_words= False)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="_IPv6_std"></a>
<div class="private">
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">_IPv6_std</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_INET6, width= 128, word_size= 16, word_fmt=<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 '%x', delimiter= ':')
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="ST_EUI64"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">ST_EUI64</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
AddrStrategy(addr_type= AT_EUI64, width= 64, word_size= 8, word_fmt= '<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
%02x', delimiter= '-', to_upper= True)
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="netaddr-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Jul 08 00:36:47 2008
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
